package ve.lm.hrms_cy.Controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import ve.lm.hrms_cy.Entity.Announcement;
import ve.lm.hrms_cy.Entity.Request.AnnouncementQueryRequest;
import ve.lm.hrms_cy.Entity.Request.RequestBillQueryRequest;
import ve.lm.hrms_cy.Entity.RequestBill;
import ve.lm.hrms_cy.Entity.Response.ResponseEntityCY;
import ve.lm.hrms_cy.Service.CheckManagerService;

@RestController
@RequestMapping("/checkManager")
public class CheckManagerController {

    @Autowired
    CheckManagerService checkManagerService;

        @PostMapping("/announcementManager/addAnnouncement")
    public ResponseEntityCY<Boolean> addAnnouncement(@RequestBody Announcement announcement){

            return checkManagerService.addAnnouncement(announcement);

        }

    @PostMapping("/announcementManager/findAnnouncementByPage")
    public ResponseEntityCY<IPage<Announcement>> addAnnouncement(@RequestBody AnnouncementQueryRequest announcementQueryRequest){

        return checkManagerService.findAnnouncementByPage(announcementQueryRequest);

    }

    @PostMapping("/announcementManager/updateAnnouncement")
    public ResponseEntityCY<Boolean> updateAnnouncement(@RequestBody Announcement announcement){

        return checkManagerService.updateAnnouncement(announcement);

    }

    @PostMapping("/requestBillManager/addRequestBill")
    public ResponseEntityCY<Boolean> addRequestBill(@RequestBody RequestBill requestBill){

            return checkManagerService.addRequestBill(requestBill);

    }

    @PostMapping("/requestBillManager/findRequestBillByPage")
    public ResponseEntityCY<IPage<RequestBill>> addRequestBill(@RequestBody RequestBillQueryRequest requestBillQueryRequest){

        return checkManagerService.findRequestBillByPage(requestBillQueryRequest);

    }

    @PostMapping("/requestBillManager/updateRequestBill")
    public ResponseEntityCY<Boolean> updateRequestBill(@RequestBody RequestBill requestBill){

        return checkManagerService.updateRequestBill(requestBill);

    }
}
